#!/usr/bin/env bash
set -ex

# format code
if [[ $CI ]]; then
    ./.venv/bin/ruff format --check
    ./.venv/bin/ruff check .
else
    ./.venv/bin/ruff format
    ./.venv/bin/ruff check --fix .
fi

# type check code
./.venv/bin/mypy .
